<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get or set flags on function or class</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.uopz-flags" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">uopz_flags</h1>
  <p class="verinfo">(PECL uopz 2 &gt;= 2.0.2, PECL uopz 5)</p><p class="refpurpose"><span class="refname">uopz_flags</span> &mdash; <span class="dc-title">Get or set flags on function or class</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.uopz-flags-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>uopz_flags</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$function</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>
   ) : <span class="type">int</span></div>

  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>uopz_flags</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$class</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$function</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>
   ) : <span class="type">int</span></div>

  <p class="para rdfs-comment">
 Get or set the flags on a class or function entry at runtime
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.uopz-flags-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>
<code class="parameter">class</code></dt>

    <dd>

     <p class="para">
 The name of a class
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">function</code></dt>

    <dd>

     <p class="para">
 The name of the function
     </p>
    </dd>

   
    
    <dt>
<code class="parameter">flags</code></dt>

    <dd>

     <p class="para">
 A valid set of ZEND_ACC_ flags, ZEND_ACC_FETCH to read flags
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.uopz-flags-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
 If setting, returns old flags, else returns flags
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.uopz-flags-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-570">
   <p><strong>Example #1 <span class="function"><strong>uopz_flags()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">Test&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">method</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">__CLASS__</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">$flags&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">uopz_flags</span><span style="color: #007700">(</span><span style="color: #DD0000">"Test"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"method"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ZEND_ACC_FETCH</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">((bool)&nbsp;(</span><span style="color: #0000BB">uopz_flags</span><span style="color: #007700">(</span><span style="color: #DD0000">"Test"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"method"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ZEND_ACC_FETCH</span><span style="color: #007700">)&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">ZEND_ACC_PRIVATE</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">((bool)&nbsp;(</span><span style="color: #0000BB">uopz_flags</span><span style="color: #007700">(</span><span style="color: #DD0000">"Test"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"method"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ZEND_ACC_FETCH</span><span style="color: #007700">)&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">ZEND_ACC_STATIC</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">uopz_flags</span><span style="color: #007700">(</span><span style="color: #DD0000">"Test"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"method"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$flags</span><span style="color: #007700">|</span><span style="color: #0000BB">ZEND_ACC_STATIC</span><span style="color: #007700">|</span><span style="color: #0000BB">ZEND_ACC_PRIVATE</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">((bool)&nbsp;(</span><span style="color: #0000BB">uopz_flags</span><span style="color: #007700">(</span><span style="color: #DD0000">"Test"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"method"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ZEND_ACC_FETCH</span><span style="color: #007700">)&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">ZEND_ACC_PRIVATE</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">((bool)&nbsp;(</span><span style="color: #0000BB">uopz_flags</span><span style="color: #007700">(</span><span style="color: #DD0000">"Test"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"method"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ZEND_ACC_FETCH</span><span style="color: #007700">)&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">ZEND_ACC_STATIC</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
   </div>

   <div class="example-contents"><p>以上例程的输出类似于：</p></div>
   <div class="example-contents screen">
<div class="cdata"><pre>
bool(false)
bool(false)
int(1234567890)
bool(true)
bool(true)
</pre></div>
   </div>
  </div>
 </div>


</div></div></div></body></html>